class Feed::OrderItemCreated < Feed
  validates :order_item_id,
    :presence => true

  def code
    ActiveSupport::StringInquirer.new('has_been_ordered')
  end

  def short_desc
    "顾客于#{order_item.order.ordered_on}<b>预订</b>【#{
    order_item.furniture_code}-#{
    order_item.furniture_name} => #{
    order_item.ordered_count}件】"
  end

  def remark
    order_item.remark
  end

  def related_one
    order_item
  end
  
  def related_html_id
    "related_order_item_#{order_item.id}"
  end
  
  def related_type
    "related_order_item"
  end
end
